package thread;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25397
 * Date: 2022-03-24
 * Time: 19:43
 */
public class Demo4 {
//    public static void main(String[] args) {
//        Thread t=new Thread(){//匿名内部类用一次结束
//            @Override
//            public void run(){
//                System.out.println("hello thread");
//            }
//        };
//        t.start();
//    }

    public static void main(String[] args) {
        Thread t=new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("hello thread");
            }
        });
        t.start();
    }
}
